#_*_coding:utf-8_*_
__author__ = 'alex'


def login(func):
    def wrapper(arg):
        print "running "
        user = raw_input("login:").strip()
        if user == 'alex':
            print "---welcom login----"
            return func(arg)
    return wrapper

@login #=wrapper
def  task2(name):
    print "run task 2",name
    return name

res = task2("task 22222")

print '==>',res


def login2(func):
    def wrapper(arg):
        print "running user authentication"
        user = raw_input("login:").strip()
        if user == 'alex':
            print "---welcom login----"
            return  func(arg)
    return wrapper




def task(name):
    print "run task",name
    #return name





def task3():
    print "run task 3"

